#include<stdio.h>

int power(int x, int y);

int main() {

	printf("Small program with a function\n");
	printf("Power of a number\n");

	int a, b;
	printf("Base: ");
	scanf("%d", &a);
	printf("Power: ");
	scanf("%d", &b);

	printf("Given base: %d and given power: %d\n", a, b);
	printf("Rsult: %d\n", power(a, b));


}

int power(int base, int power) {
	int result;
	int i;
	result = 1;

	for (i = 1; i <= power; ++i) {
		result *= base;
	}

	return result;
}
